package decorator_pattern;

/**
 * ConcreteComponentB
 *
 * @author wangzg13
 * @since 2022/7/30
 */
public class ADecorator extends Decorator{
    public ADecorator(Component component) {
        super(component);
    }

    private void aDecoratorMethod(){
        System.out.println("A装饰类的装饰");
    }

    /**
     * 对装饰器类抽象类中的对象进行装饰
     */
    @Override
    public void operate() {
        this.aDecoratorMethod();
        super.operate();
    }
}
